package main

import "fmt"

func modify(p *int){
	fmt.Println(p)
	*p = 100000
}

func main() {

	var a = 10
	fmt.Println(&a)

	var p *int
	p = &a

	fmt.Println("the address of p:", p)
	fmt.Println("the value of p:", *p)

	*p = 100
	fmt.Println(a)

	var b = 999
	p = &b
	*p = 5
	fmt.Println(p)
	fmt.Println(*p)
	fmt.Println(b)
	fmt.Println(a)

	modify(&a)
	fmt.Println(a)
}
